var e = getApp();
Component({
  properties: {
    now: { type: String, value: 'index' },
    cartNum: { type: Number, value: 0 },
  },
  data: { isIpx: e.globalData.isIpx },
  ready: function () {},
  methods: {
    _tableJump: function (a) {
      var i = a.currentTarget.dataset.jump;
      if (i != this.properties.now)
        if ('index' == i) wx.switchTab({ url: '/pages/index/index' });
        else if ('my' == i) wx.switchTab({ url: '/pages/center2/center2' });
        else if ('classify' == i)
          wx.switchTab({ url: '/pages/classificationII/classificationII' });
        else if ('cart' == i) {
          if (!e.globalData.userInfo && !e.globalData.centerShowedLogin)
            return void wx.navigateTo({ url: '/pages/loginNew/loginNew' });
          wx.navigateTo({ url: '/pages/shoppingCart/shoppingCart' });
        } else wx.reLaunch({ url: '/pages/find/find' });
    },
  },
});
